package com.itheima.health.dao;

import com.itheima.health.pojo.Member;
import com.itheima.health.pojo.Order;
import com.itheima.health.pojo.OrderSetting;
import com.itheima.health.vo.AdvanceOrderDTO;
import com.itheima.health.vo.DataVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * @Author 山外小王
 * @Description
 * @Date 2024/04/17/15:50
 */
@Mapper
public interface OrderSettingDao {

    long findCountByOrdrDate(Date orderDate);



    void add(OrderSetting orderSetting);

    void update(OrderSetting orderSetting);

    List<OrderSetting> getOrderSettingByMonth(Date firstDay, Date lastDay);

    /**
     * 统计会员 指定电话号码
     * @param telephone
     * @return
     */
    int countTelephone(String telephone);

    /**
     * 注册会员
     * @param member
     */
    void registerMember(Member member);

    /**
     * 获取会员id
     * @param telephone
     * @return
     */
    int getmemberId(String telephone);

    /**
     * 添加预约信息
     * @param order
     */
    void addOrder(Order order);

    /**
     * 查找一个会员一个日期的所有预约套餐
     * @param memberId
     * @param parse
     * @return
     */
    Integer[] selectSetmealIds(int memberId, Date parse);

    int selectNumber(Date parse);

    int selectReservations(Date parse);

}
